<% if @preview -%>
	<h2>Preview: <%= @post.title %></h2>
	
	<%= @preview %>
	
	<hr />
	
<% end -%>

<% form_for :post do |f| -%>

	<% if flash[:new_post_error] -%>
		<div class="error" id="new_post_error"><%= flash[:new_post_error] %></div>
	<% end -%>
	
	<label for="post_title">Title:</label><br />
	<%= f.text_field :title, :class => 'fixed' %><br />
	
	<label for="post_raw_text">Raw Text:</label><br />
	<%= f.text_area :raw_text, :class => 'fixed' %><br />
	
	<%= submit_tag 'Save', :class => 'submit' %>
	<%= submit_tag 'Preview', :class => 'submit' %>
	or <%= link_to 'cancel', :action => :index %>
	
<% end -%>